<template>
	<div>
		<div v-if="showFlg">
			<slot></slot>
		</div>
	</div>
</template>

<script>
	export default {
		name: "p-view",
		props: {
			ps: {
				type: Array,
				default: () => [""]
			}
		},
		computed: {
			current: function() {
				return this.store.state.currentUser;
			},
		},
		data: function() {
			return {
				showFlg: false
			}
		},
		created: function(){
			for (let index in this.ps) {
				let code = this.ps[index];
				if (this.store.state.currentUser.permissionCodeString.search(code) > 0) {
					this.showFlg = true;
					break;
				}
			}
		},
	}
</script>

<style>
</style>